<admintpl file="header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">退款列表</a></li>
    </ul>
    <form class="well form-search" method="post" action="{:U('lists')}">

        <!--课程名称：
        <input type='text' class="form-control" value="{$formget.lesson_name}" name="lesson_name" />
        课程类型：
        <select name="type" id="" style="width: 100px;">
            <option value="">全部</option>
            <option value="face" <if condition="$formget.type eq 'face'">selected</if> >面授</option>
            <option value="live" <if condition="$formget.type eq 'live'">selected</if> >直播</option>
        </select>
        学期
        <select name="term" id="" style="width: 100px;">
            <option value="">全部</option>
            {$term}
        </select>
        年级
        <select name="grade" id="" style="width: 100px;">
            <option value="">全部</option>
            {$grade}
        </select>
        <input type="submit" class="btn btn-primary" value="搜索"/>-->
    </form>
    <table style="margin-top: 10px;word-break:break-all;" class="table table-hover table-bordered table-list"
           id="menus-table">
        <thead>
        <tr>
            <th >排序</th>
            <th >ID</th>
            <th>用户昵称</th>
            <th>用户手机号</th>
            <th>退款订单编号</th>
            <th>订单编号</th>
            <th>退款金额</th>
            <th>申请时间</th>
            <th>更新时间</th>
            <th>状态</th>

            <th width="10%">操作</th>
        </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo" key="k">
            <tr>
                <td>{$k}</td>
                <td>{$vo.refund_id}</td>
                <td>{$vo.nickname}</td>
                <td>{$vo.phone}</td>
                <td>{$vo.out_refund_no}</td>
                <td>{$vo.order_sn}</td>
                <td>{$vo.order_price}</td>
                <td>{$vo.create_time}</td>
                <td>{$vo.update_time}</td>
                <td>{$vo.status_string}</td>
                <td>
                    <if condition="$vo['status'] eq 'wait'">
                        <a class="js-ajax-dialog-btn" href="{:U('check', ['refund_id' => $vo['refund_id'], 'status' => 'accept'])}">审核通过</a> | <a data-toggle="modal" data-target="#myModal"  class="add_ext"  onclick=""   name="{$vo.refund_id}">审核拒绝</a>
                        <else/>
                        <a href="{:U('detail', ['apply_id' => $vo['apply_id']])}">查看详情</a>
                    </if>
                </td>
            </tr>
        </volist>
        </tbody>
    </table>
    <div class="pagination" >{$Page}</div>
</div>

<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">拒绝理由</h3>
    </div>
    <form action="{:U('check')}" method="post"
          class="form-horizontal js-ajax-form">
        <div class="modal-body">
            <table>
                <tbody>
                <tr>
                    <td>理由：</td>
                    <input type="hidden" name="refund_id" class="refund_id" value="">
                    <input type="hidden" name="status" class="status" value="refuse">
                    <td><input type="text" name="content" value=""><span>&nbsp;*</span></td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
            <button type="submit" class="btn btn-primary ">保存</button>
        </div>

</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    $('.add_ext').click(function () {
        var id = $(this).attr("name");
        console.log(id);
        $(".refund_id").val(id);
    });
</script>
</body>
</html>

